home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / nsclilib / ni_encr.h < prev    next >
Text File  |  1996-07-05  |  3KB  |  74 lines

  1. /*
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *               National Center for Biotechnology Information
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government have not placed any restriction on its use or reproduction.
  13. *
  14. *  Although all reasonable efforts have been taken to ensure the accuracy
  15. *  and reliability of the software and data, the NLM and the U.S.
  16. *  Government do not and cannot warrant the performance or results that
  17. *  may be obtained by using this software or data. The NLM and the U.S.
  18. *  Government disclaim all warranties, express or implied, including
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.
  21. *
  22. *  Please cite the author in any work or product based on this material.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ni_encr.h
  27. *
  28. * Author:       Epstein
  29. *
  30. * Version Creation Date:        2/14/94
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description:
  35. *   Header for for RSAREF-based encryption support in NCBI network services
  36. *
  37. *
  38. * Modifications:
  39. * --------------------------------------------------------------------------
  40. * Date     Name        Description of modification
  41. * -------  ----------  -----------------------------------------------------
  42. *
  43. *
  44. * RCS Modification History:
  45. * $Log: ni_encr.h,v $
  46.  * Revision 4.0  1995/07/26  13:56:32  ostell
  47.  * force revision to 4.0
  48.  *
  49.  * Revision 1.4  1995/05/17  17:52:03  epstein
  50.  * add RCS log revision history
  51.  *
  52. */
  53.  
  54. #ifndef _NI_ENCR_
  55. #define _NI_ENCR_
  56.  
  57. Boolean LIBCALL NI_SetupDESEncryption PROTO((NI_HandPtr mh, UcharPtr desKey));
  58. Boolean LIBCALL NI_PubKeysEqual PROTO((NI_PubKeyPtr x, NI_PubKeyPtr y));
  59. void NI_GenerateDESKey PROTO((UcharPtr desKey));
  60. Boolean LIBCALL NI_GenAndWritePEMKeys PROTO((Int2 bits, AsnIoPtr pubAip, FILE *privFp));
  61. Boolean LIBCALL NI_WritePubKeyToConfig PROTO((NI_PubKeyPtr pub));
  62. NI_PubKeyPtr LIBCALL NI_ReadPubKeyFromConfig PROTO((void));
  63. NI_PubKeyPtr LIBCALL NI_PubKeyDup PROTO((NI_PubKeyPtr orig));
  64. VoidPtr LIBCALL NI_LoadPrivKey PROTO((FILE *fp, Int2Ptr privKeyLenPtr));
  65. Int2 LIBCALL NI_PubKeyDecrypt PROTO((VoidPtr pKey, UcharPtr PNTR plainText, UcharPtr cipherText, Int2 cipherTextLen));
  66. Int2 LIBCALL NI_PubKeyEncrypt PROTO((NI_PubKeyPtr pub, UcharPtr plainText, Int2 plainTextLen, UcharPtr PNTR cipherText));
  67. void NI_DestroyEncrStruct PROTO((NI_EncrDataPtr encr));
  68. Boolean LIBCALL NI_EncrAvailable PROTO((void));
  69.  
  70.  
  71.  
  72. #endif /* _NI_ENCR_ */
  73.  
  74.